package edu.xust.MetadataGenerator.domain;

import java.util.LinkedList;
import java.util.List;

import com.google.gson.annotations.Expose;

public class APIParam {
	private static final long id = Table.generateId();

	@Expose
	private String name;
	
	@Expose
	private String type;
	
	@Expose
	private List<APIValidator> validators;

	public APIParam(){
		name = "parameter";
		type = "int";
		validators = new LinkedList<APIValidator>();
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name.replace(" ", "");
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type.replace(" ", "");
	}

	public List<APIValidator> getValidators() {
		return validators;
	}

	public void setValidators(List<APIValidator> validators) {
		this.validators = validators;
	}

	public static long getId() {
		return id;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name;
	}
	
}
